package org.nf.shopping.service.Impl;

import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import org.nf.shopping.entity.Detailsr;
import org.nf.shopping.mapper.DetailsrMapper;
import org.nf.shopping.service.DetailsrService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author czl
 * @Date 2024-12-19
 */
@Service
@RequiredArgsConstructor
public class DetailsrServiceImpl implements DetailsrService {

    private final DetailsrMapper detailsrMapper;

    @Override
    public PageInfo<Detailsr> listDetailsr(Integer pageSize, Integer pageNum, Integer id) {
        List<Detailsr> list = detailsrMapper.listDetailsr(pageSize,pageNum,id);
        PageInfo<Detailsr> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }

    @Override
    public void updateDetailsr(Detailsr detailsr) {
        detailsrMapper.updateDetailsr(detailsr);
    }

    @Override
    public void deloneDetailsr(Integer id) {
        detailsrMapper.deloneDetailsr(id);
    }

    @Override
    public void addDetailsr(Detailsr detailsr) {
        detailsrMapper.addDetailsr(detailsr);
    }

    @Override
    public List<Detailsr> getDetailsrList() {
        return detailsrMapper.getDetailsrList();
    }
}
